package mati.buscaMedico;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.ArrayAdapter;
import android.widget.Spinner;

public class MatiMedicoActivity extends Activity{
    /** Called when the activity is first created. */
    
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.principal);
        
        Spinner s = (Spinner) findViewById(R.id.spinner);
        ArrayAdapter<CharSequence> adapter = ArrayAdapter.createFromResource(
                this, R.array.especialidades, android.R.layout.simple_spinner_item);
        adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
        s.setAdapter(adapter);

        
    }

    public void onClickBuscarUbi(View view){
    	Intent myIntent = new Intent(view.getContext(), MatiMedicoActivityBuscarUbi.class);
    	myIntent.putExtra("especialidad", (String)((Spinner)findViewById(R.id.spinner)).getSelectedItem());
    	myIntent.putExtra("espe", (String)((Spinner)findViewById(R.id.spinner)).getSelectedItem());
    	startActivityForResult(myIntent, 0);
    }
	
    
}